PreviousNextTracker indexSee it online !

(6/185) 15 - Word Wrapping and XML Markup

Word Wrapping and XML Markup

jEdit should be able to automatically format XML files
in a more advanced way.

e.g. <XML-TAG-1 ...><XML-TAG-2> should be split between
the 2 tags, i.e. between the ending ...> and the
beginning <... .

Currently, jEdit is NOT able to recognize this as a
valid word wrap splitting point.


Also, jEdit should be able to automatically indent and
format the XML in a more readable fashion, e.g.:
<XML-TAG-1 ...
_... TAG may continue IF it does NOT fit on one LINE
_<- BUT let it be slightly indented
_...> # END OF TAG
____<XML-TAG-2; INDENT IF nested within previous TAG

... and so on

This should all be done automatically.

I will attach a good file to test such options.

Submitted discoleo - 2006-10-20 22:58:47 Assigned daleanson
Priority 5 Labels
Status open Group None
Resolution None

Comments

2006-10-20 22:58:48
discoleo

A test file for advanced formatting/markup

content.xml (7.7Kio)

2006-10-20 23:28:06
daleanson

Logged In: YES
user_id=187628

Just checking -- are you aware of the XMLIndenter plugin?
It does a pretty good job of formatting xml files. I've
attached a copy of your example file formatted with
XMLIndenter for your perusal.

2006-10-20 23:28:06
daleanson

content.xml formatted with XMLIndenter plugin

content_formatted.xml (8.4Kio)

2006-10-20 23:30:19
daleanson

Logged In: YES
user_id=187628

I should have mentioned that XMLIndenter is not a separate
plugin anymore, it's part of the XML plugin and is
compatible with the Beauty plugin.

2006-10-21 10:00:38
discoleo

Logged In: YES
user_id=1530503

Indeed, I missed the XML-plugin. \[Sorry for this, my fault.\]

However, there are still 2 issues that would be great to
implement:
- IF I choose word-wrap, and the TAG is continued on a
second line, it would be nice to indent the 2-... lines by
1-2 spaces:
<TAG-START ...
_<- TAG continues BUT is indented a little bit

- again, IF word-wrap is selected, I would like to have some
other line-breaking points, like after ";" in a TAG (rare
occurence, but may occur)

Nevertheless, great program\!

2006-12-18 17:21:47
ezust

- **assigned_to**: nobody --> robmckinnon

2006-12-18 17:21:47
ezust

Logged In: YES
user_id=935841
Originator: NO

Assigning to Rob McKinnon, who wrote the xmlindenter.

2007-09-30 03:37:34
daleanson

Logged In: YES
user_id=187628
Originator: NO

If Rob doesn't respond in the next few days, I'll take this one on.

2011-11-27 18:07:43
ezust

- **assigned_to**: robmckinnon --> daleanson